package leetcode.秋招.美团;

import java.util.Scanner;

/**
 * @author ：zsy
 * @date ：Created 2021/8/8 10:29
 * @description：
 */
public class 奇怪的键盘 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        s = s.trim();
        StringBuilder builder = new StringBuilder();
        char[] chars = s.toCharArray();
        char pre = ' ';
        for (char ch : chars) {
            if (ch == ' ') continue;
            if (ch == pre) continue;
            builder.append(ch);
            pre = ch;
        }
        System.out.println(builder.toString());
    }


}
